package monitor

import "vrcm/src/vrcm/common/models"

type Worksite struct {
	models.Model

	TenantId          string           `json:"tenant_id" gorm:"type:varchar(50);comment:租户"`
	WorkSite          string           `json:"worksite"  gorm:"column:worksite;type:varchar(100);comment:工口"`
	WorkSiteType      int              `json:"worksite_type" gorm:"column:worksite_type;tinyint;comment:类型 1系统 2自定义"`
	WorkSiteAuthority string           `json:"worksite_authority" gorm:"column:worksite_authority;type:varchar(100);comment:"`
	Members           []WorksiteMember `json:"members" gorm:"-"`
	MonitorBasics     []MonitorBasic   `json:"monitor_basics" gorm:"-"`
	models.ModelTime
	models.ControlBy
}

func (Worksite) TableName() string {
	return "worksite"
}

type WorksiteMember struct {
	models.Model

	TenantId      string `json:"tenant_id" gorm:"type:varchar(50);comment:租户"`
	MemberName    string `json:"member_name"  gorm:"column:member_name;type:varchar(100);comment:关联id"`
	MemberAccount string `json:"member_account" gorm:"column:member_account;varchar(100);comment:类型 1系统 2自定义"`
	MobilePhone   string `json:"mobile_phone" gorm:"column:mobile_phone;type:varchar(100);comment:"`
	WorkSiteId    int    `json:"worksite_id"  gorm:"column:worksite_id;type:bigint;comment:关联id"`
	models.ModelTime
	models.ControlBy
}

func (WorksiteMember) TableName() string {
	return "worksite_member"
}

type WorksiteNotice struct {
	models.Model

	TenantId        string         `json:"tenant_id" gorm:"type:varchar(50);comment:租户"`
	EventId         int            `json:"event_id" gorm:"type:bigint;comment:活动id"`
	WorkSiteId      string         `json:"worksite_id"  gorm:"column:worksite_id;type:varchar(100);comment:工口id"`
	Notice          string         `json:"notice" gorm:"varchar(2000);comment:消息"`
	ProgramId       string         `json:"program_id" gorm:"varchar(50);comment:节目单id"`
	NoticeState     int            `json:"notice_state" gorm:"tinyint;comment:消息状态 1发送 2未发送"`
	StateUpdateTime int            `json:"state_update_time" gorm:"int;comment:状态更新时间"`
	Duration        int            `json:"duration" gorm:"int;comment:公告持续时间"`
	IsSend          int            `json:"is_send"  gorm:"tinyint;comment:是否发送 1是 2否 "`
	WorkSite        string         `json:"worksite"  gorm:"-"`
	WorkSiteInfos   []WorkSiteInfo `json:"worksite_infos"  gorm:"-"`
	ConfirmWorkSite string         `json:"confirm_worksite"  gorm:"-"`
	models.ModelTime
	models.ControlBy
}

type WorkSiteInfo struct {
	WorkSiteId int    `json:"worksite_id"`
	WorkSite   string `json:"worksite"`
}

func (WorksiteNotice) TableName() string {
	return "worksite_notice"
}

type WorksiteNotices struct {
	WorksiteNotices []WorksiteNotice `json:"worksite_notices" gorm:"type:varchar(50);comment:工口消息"`
	UpdateState     int              `json:"update_state" gorm:"tinyint;1更新"`
}

type WorksiteNoticeHistoryModel struct {
	WorksiteNotices []WorksiteNoticeHistory `json:"worksite_notices" gorm:"type:varchar(50);comment:工口消息"`
	UpdateState     int                     `json:"update_state" gorm:"tinyint;1更新"`
}

type WorksiteNoticeHistory struct {
	models.Model

	TenantId   string `json:"tenant_id" gorm:"type:varchar(50);comment:租户"`
	EventId    int    `json:"event_id" gorm:"type:bigint;comment:活动id"`
	NoticeId   int    `json:"notice_id" gorm:"type:bigint;comment:消息id"`
	WorkSiteId string `json:"worksite_id"  gorm:"column:worksite_id;type:varchar(100);comment:工口id"`
	Notice     string `json:"notice" gorm:"varchar(2000);comment:消息"`
	ProgramId  string `json:"program_id" gorm:"varchar(50);comment:节目单id"`
	//NoticeState     int    `json:"notice_state" gorm:"tinyint;comment:消息状态 1发送 2未发送"`
	Duration        int            `json:"duration" gorm:"int;comment:公告持续时间"`
	StateUpdateTime int            `json:"state_update_time" gorm:"int;comment:状态更新时间"`
	WorkSite        string         `json:"worksite"  gorm:"-"`
	ConfirmWorkSite string         `json:"confirm_worksite"  gorm:"-"`
	WorkSiteInfos   []WorkSiteInfo `json:"worksite_infos"  gorm:"-"`
	models.ModelTime
	models.ControlBy
}

type TaiBen struct {
	models.Model

	TenantId  string `json:"tenant_id" gorm:"type:varchar(50);comment:租户"`
	EventId   int    `json:"event_id" gorm:"type:bigint;comment:活动id"`
	ProgramId string `json:"program_id" gorm:"varchar(50);comment:节目单id"`
	TbTime    int64  `json:"tb_time"  gorm:"type:int;comment:台本时间"`
	TbContent string `json:"tb_content" gorm:"varchar(500);comment:台本内容"`
	models.ModelTime
	models.ControlBy
}

func (TaiBen) TableName() string {
	return "tai_ben"
}

type WorksiteConfirm struct {
	models.Model

	NoticeId   int `json:"notice_id" gorm:"type:bigint;comment:消息id"`
	WorksiteId int `json:"worksite_id" gorm:"type:bigint;comment:工口id"`
	models.ModelTime
	models.ControlBy
}

func (WorksiteConfirm) TableName() string {
	return "worksite_confirm"
}

type AuditVideo struct {
	models.Model

	TenantId   string `json:"tenant_id" gorm:"type:varchar(50);comment:租户"`
	EventId    int    `json:"event_id" gorm:"type:bigint;comment:活动id"`
	MemberId   int    `json:"member_id"  gorm:"column:member_id;type:bigint;comment:成员id"`
	MemberName string `json:"member_name"  gorm:"column:member_name;type:varchar(200);comment:成员名"`
	ProgramId  string `json:"program_id" gorm:"type:varchar(50);comment:节目单id"`
	AuditImg   string `json:"audit_img" gorm:"type:varchar(500);comment:审片图片"`
	AuditTime  int    `json:"audit_time" gorm:"type:int;comment:审片时间"`
	SignImg    []byte `json:"sign_img" gorm:"type:mediumblob;comment:签名图片数据"`
	AuditTag   string `json:"audit_tag" gorm:"type:varchar(200);comment:审核标签"`
	IsShare    int    `json:"is_share" gorm:"type:int;comment:是否分享 1是2 否"`
	WorkSite   string `json:"worksite"  gorm:"-"`
	models.ModelTime
	models.ControlBy
}
